package cn.ruituo.adv7;

public class Thread1Test {
    public static void main(String[] args) {
        for (int i = 1; i <= 4; i++) {
            Thread1 th = new Thread1("线程" + i);
            if (i > 2)
                th.setPriority(Thread.MAX_PRIORITY);
            else
                th.setPriority(Thread.MIN_PRIORITY);
            th.start();
            //th.run();//单线程程序
        }
        System.out.println(Thread.currentThread().getName() + "执行结束。。。");
    }

}
